package com.xsp.eduservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xsp.eduservice.entity.EduCourse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xsp.eduservice.entity.frontvo.CourseWebVo;
import com.xsp.eduservice.entity.vo.CourseInfoVo;
import com.xsp.eduservice.entity.vo.CoursePublishVo;
import com.xsp.eduservice.entity.vo.CourseQuery;
import com.xsp.eduservice.entity.frontvo.CourseFrontVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author testjava
 * @since 2022-02-11
 */
public interface EduCourseService extends IService<EduCourse> {
    //添加课程基本信息
    //添加完成后需要用到id，因此需要返回id值
    String saveCourseInfo(CourseInfoVo courseInfoVo);

    //根据课程id查询课程基本信息
    CourseInfoVo getCourseInfo(String courseId);

    //修改课程信息
    void updateCourseInfo(CourseInfoVo courseInfoVo);

    //确认发布的信息
    CoursePublishVo getCoursePublishVo(String id);

    //删除课程信息(小节,章节,描述,课程)
    void deleteCourse(String courseId);

    //条件查询和分页
    Page<EduCourse> pageCourseCondition(long page, long limit, CourseQuery courseQuery);

    //讲师id获取课程信息
    List<EduCourse> selectByTeacherId(String id);

    //前台课程分页条件查询
    Map<String, Object> getFrontCourseList(Page<EduCourse> coursePage, CourseFrontVo courseFrontVo);

    //查询课程信息和讲师信息
    CourseWebVo getFrontCourseInfo(String courseId);
}
